<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    html,
    body {
      width: 100%;
      height: 100%;
    }

    html {
      font-size: 12px;
    }

    .wrapper {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-direction: column;
      box-sizing: border-box;
    }

    .wrapper>div {
      padding: 0.8rem;
      /* 12*0.8=9.6px */
      background: #eee;
      border-radius: 0.8rem;
      margin: 0.8rem 0;
      line-height: 1.4rem;
      ;
      display: flex;
      align-items: center;
      word-break: break-all;
      font-size: 1rem;
      /* 12px */
    }
    img{
      width: 10rem;
      height: 8rem;
    }
  </style>
</head>

<body>
  <div class="wrapper">

      <div class="left"><img src="./facicon.png" alt=""></div>
      <div class="right">颠三倒四南非地方你说丢is诶weifUI王菲诶哦如何比uesrghveyiehsihyieushyrhuhashurihe话费呢杜甫能动</div>
    </div>
  </div>
</body>

</html>
<script>
  const t = 750;
  window.addEventListener('resize', (e) => {
    console.log(e.target.innerWidth)
    if (e.target.innerWidth > t) {
      const size = (e.target.innerWidth / t) * 12
      document.documentElement.style.fontSize = `${size}px`
    } else {
      document.documentElement.style.fontSize = "12px"
    }


  })
</script>
<script>
// 啥是rem?
rem:相对于根元素html（网页）的font-size
//为啥用了rem就能适配
方便控制


</script>